<!DOCTYPE html>
<html lang="en" theme="default">
<head>
    <meta charset="UTF-8"/>
    <link rel="icon" type="image/svg+xml" href="/vite.svg"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <title>Vite + Vue + TS</title>
    <script>
        function loadStyles(url) {
            var link = document.createElement("link");
            link.rel = "stylesheet";
            link.type = "text/css";
            link.href = url;
            var head = document.getElementsByTagName("head")[0];
            head.appendChild(link);
        }

        var item = localStorage.getItem("persist:app")
        if (!item) {
            loadStyles("//cdn.jsdelivr.net/npm/rc-easyui@1.2.9/dist/themes/default/easyui.css")
        } else {
            var json = JSON.parse(item)
            var theme = json.theme || "default"
            theme = theme.replace(new RegExp('"', 'g'), '')
            loadStyles("//cdn.jsdelivr.net/npm/rc-easyui@1.2.9/dist/themes/" + theme + "/easyui.css")
            document.querySelector('html').setAttribute('theme', theme)
        }
    </script>
    <link type="text/css" rel="stylesheet" href="//cdn.jsdelivr.net/npm/rc-easyui@1.2.9/dist/themes/icon.css">
    <link type="text/css" rel="stylesheet" href="//cdn.jsdelivr.net/npm/rc-easyui@1.2.9/dist/themes/react.css">
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
</body>
</html>
